NETBSD_RELEASE ?= 2.0
-NETBSD_CVSSNAP ?= 20040906
+NETBSD_CVSSNAP ?= 20041103
EXTRAVERSION = xenU
options INSECURE # disable kernel security levels - X needs this
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
-#options NTP # NTP phase/frequency locked loop
+options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
#options SYSTRACE # system call vetting via systrace(1)
union xennet_bufarray sc_rx_bufa[NETIF_TX_RING_SIZE];
SLIST_HEAD(, xennet_txbuf) sc_tx_bufs;
+
+#if NRND > 0
+ rndsource_element_t sc_rnd_source;
+#endif
};
struct xennet_attach_args {
struct dk_intf *sc_di; /* pseudo-disk interface */
struct simplelock sc_slock; /* our lock */
int sc_shutdown; /* about to be removed */
+#if NRND > 0
+ rndsource_element_t sc_rnd_source;
+#endif
};
struct xbd_attach_args {
void
xen_delay(int n)
{
- u_int64_t when;
+ uint64_t when;
get_time_values_from_xen();
when = shadow_system_time + n * 1000;
__KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.1.2.1 2004/05/22 15:58:29 he Exp $");
#include "opt_inet.h"
+#include "rnd.h"
#include <sys/param.h>
#include <sys/systm.h>
ether_sprintf(sc->sc_enaddr));
#if NRND > 0
- rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
+ rnd_attach_source(&sc->sc_rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0);
#endif
break;
network_tx_buf_gc(sc);
+#if NRND > 0
+ rnd_add_uint32(&sc->sc_rnd_source, sc->sc_rx_resp_cons);
+#endif
+
again:
for (ringidx = sc->sc_rx_resp_cons;
ringidx != sc->sc_rx->resp_prod;
panic("%s: No packet to start", sc->sc_dev.dv_xname);
#endif
+#if NRND > 0
+ rnd_add_uint32(&sc->sc_rnd_source, sc->sc_tx->req_prod);
+#endif
+
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
return;
__KERNEL_RCSID(0, "$NetBSD: xbd.c,v 1.9.2.1 2004/05/22 15:59:11 he Exp $");
#include "xbd.h"
+#include "rnd.h"
#include <sys/types.h>
#include <sys/param.h>
#include <uvm/uvm.h>
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
#include <dev/dkvar.h>
#include <machine/xbdvar.h>
NULL, 0, &xs->sc_xd_device, 0,
CTL_CREATE, CTL_EOL);
}
+
+#if NRND > 0
+ rnd_attach_source(&xs->sc_rnd_source, xs->sc_dev.dv_xname,
+ RND_TYPE_DISK, 0);
+#endif
}
static int
if (pxr->xr_aligned)
unmap_align(pxr);
PUT_XBDREQ(pxr);
- if (xs)
+ if (xs) {
disk_unbusy(&xs->sc_dksc.sc_dkdev,
(bp->b_bcount - bp->b_resid),
(bp->b_flags & B_READ));
+#if NRND > 0
+ rnd_add_uint32(&xs->sc_rnd_source,
+ bp->b_blkno);
+#endif
+ }
biodone(bp);
}
continue;
unmap_align(pxr);
PUT_XBDREQ(pxr);
- if (xs)
+ if (xs) {
disk_unbusy(&xs->sc_dksc.sc_dkdev,
(bp->b_bcount - bp->b_resid),
(bp->b_flags & B_READ));
+#if NRND > 0
+ rnd_add_uint32(&xs->sc_rnd_source,
+ bp->b_blkno);
+#endif
+ }
biodone(bp);
if (!SIMPLEQ_EMPTY(&xbdr_suspended))
xbdresume();